$().ready(function() {
	let infoId = sessionStorage.getItem('infoId'),userid = '';
	$.ajax({
		cache : true,
		type : "POST",
		url : "/api/orderInfo/getOrder",
		data : {id:infoId},// 你的formid
		async : false,
		error : function(request) {
			parent.layer.alert("Connection error");
		},
		success : function(data) {
			if (data.code == 0) {
				userid = data.data.id;
				$("#sysUserid").html(data.data.name)
				$("#rechargeTime").html(data.data.createTime)
				$("#rechargeMoney").html(data.data.totalFee)
				$("#remark").html(data.data.orderRemark)

			} else {
				parent.layer.alert(data.msg)
			}

		}
	});

	$("#uploader").click(function (){
		$.ajax({
			cache : true,
			type : "POST",
			url : "/api/orderInfo/edit",
			data : {id:userid,orderRemark:$("#remark").val()},// 你的formid
			async : false,
			error : function(request) {
				parent.layer.alert("Connection error");
			},
			success : function(data) {
				if (data.code == 0) {

					parent.layer.msg("操作成功");
					parent.load();
					var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
					parent.layer.close(index);

				} else {
					parent.layer.alert(data.msg)
				}

			}
		});
	})

});
